<template>
  <div>
    <van-nav-bar
      title="安全中心"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    >
      <template #right>
        <van-icon name="ellipsis" />
      </template>
    </van-nav-bar>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item><img src="wodeimg/lun1.jpg" /></van-swipe-item>
      <van-swipe-item><img src="wodeimg/lun2.jpg" /></van-swipe-item>
    </van-swipe>
    <div>
      <div class="manage">信息管理</div>
      <!-- <van-grid :column-num="3">
        <van-grid-item
          v-for="value in 8"
          :key="value"
          icon="photo-o"
          text="文字"
        />
      </van-grid> -->
      <!-- <van-grid :column-num="3">
        <van-grid-item v-for="(v, i) in icon" :key="i" :text="v.title" />
        <div>
          <van-image :src="v.imgurl" />
        </div>
        <div>
          <span>{{ v.title }}</span>
        </div>
      </van-grid> -->
      <ul class="one">
        <li v-for="(v, i) in icon" :key="i">
          <img :src="v.imgurl" alt="" />
          <p>{{ v.title }}</p>
        </li>
      </ul>
    </div>
    <!-- <div>
      <div class="manage">授权管理</div>
    </div>
    <div>
      <div class="manage">安全验证</div>
    </div>
    <div>
      <div class="manage">兰网</div>
    </div> -->
  </div>
</template>

<script>
import { Toast } from "vant";
import link from "@/api/link.js";
export default {
  data() {
    return {
      icon: [],
    };
  },
  created() {
    link("/userlist").then((ok) => {
      this.icon = ok.data.icon;
    });
  },
  methods: {
    onClickLeft() {
      Toast(this.$router.go(-1));
    },
  },
};
</script>

<style scoped lang="scss">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 0.2rem;
  line-height: 0.18rem;
  text-align: center;
  background-color: #39a9ed;
}
img {
  width: 100%;
}
.manage {
  font-size: 0.18rem;
  height: 0.4rem;
  margin-left: 0.3rem;
  line-height: 0.4rem;
  margin-top: 0.2rem;
}
.one {
  width: 90%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  li {
    width: 33%;
    height: 0.86rem;
    text-align: center;
    font-size: 0;
    margin-bottom: 0.2rem;
    img {
      width: 30%;
      height: 40%;
      vertical-align: top;
      margin-top: 0.3rem;
      margin-bottom: 0.18rem;
    }
    p {
      font-size: 0.12rem;
      text-align: center;
    }
  }
}
</style>